package cn.iocoder.yudao.module.bpm.controller.admin.taskinfo.vo;

import cn.iocoder.yudao.module.bpm.framework.flowable.config.CustomLocalDateTimeDeserializer;
import cn.iocoder.yudao.module.bpm.framework.flowable.config.CustomLocalDateTimeSerializer;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.io.Serializable;
import java.util.*;
import javax.validation.constraints.*;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 流程任务信息新增/修改 Request VO")
@Data
public class BpmTaskInfoSaveReqVO implements Serializable {

    private static final long serialVersionUID = -4692140313815404766L;

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "29572")
    private Long id;

    @Schema(description = "项目id")
    private Long projectId;

    @Schema(description = "任务编号")
    private String code;

    @Schema(description = "任务名称", example = "赵六")
    private String name;

    @Schema(description = "任务类型：1-标准任务，2-流程任务", example = "1")
    private Integer type;

    @Schema(description = "表单类型", example = "1")
    private String formId;

    @Schema(description = "负责人id", example = "14824")
    private Long adminId;

    @Schema(description = "确认人id", example = "4669")
    private Long confirmId;

    @Schema(description = "关注人id", example = "31387")
    private Long attentionId;

    @Schema(description = "任务状态：", example = "1")
    private Integer status;

    @Schema(description = "计划开始时间")
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
    private LocalDateTime startTime;

    @Schema(description = "计划结束时间")
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    @JsonDeserialize(using = CustomLocalDateTimeDeserializer.class)
    private LocalDateTime endTime;

    @Schema(description = "标签id", example = "11629")
    private Long tagId;

    @Schema(description = "流程实例的编号", example = "25549")
    private String processInstanceId;

    @Schema(description = "父任务", example = "15602")
    private Long parentId;

    @Schema(description = "关联任务", example = "5575")
    private Long relationId;

    @Schema(description = "任务描述", example = "随便")
    private String description;

    @Schema(description = "任务排序,order值大的排序靠前")
    private Long orderRank;

    @Schema(description = "流程定义的编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private String processDefinitionId;
    @Schema(description = "变量实例（动态表单）")
    private Map<String, Object> variables;
    @Schema(description = "发起人自选审批人 Map", example = "{taskKey1: [1, 2]}")
    private Map<String, List<Long>> startUserSelectAssignees;

}